There are conventionally known image processing apparatuses that perform coding based on quantized image data divided into bit planes. Such image processing apparatuses include those in compliance with JPEG 2000, for instance. FIG. 1 is a block diagram showing a JPEG 2000-compliant image processing apparatus 50. In the image processing apparatus 50, first, image data is converted to three signals of Y (luminance), Cr (color difference), and Cb (color difference) in a color conversion part 1. In a discrete wavelet transform (DWT) part 2, the three signals are separately subjected to discrete wavelet transform of level three using an irreversible transform filter called an IR 9/7 filter in JPEG 2000. The wavelet coefficients obtained in the DWT part 2 are subjected to scalar quantization in a quantization part 3.
Next, in a coefficient modeling part 4, the wavelet coefficients are divided into blocks of a predetermined size in each sub-band so that the scalar-quantized data is decomposed, block by block, into bit planes in order from the MSBs (most significant bits) to the LSBs (least significant bits).
FIG. 2 is a diagram showing a state where the 8-bit wavelet coefficients of a block are decomposed into eight bit planes. The coefficient modeling part 4 codes, or performs coefficient coding on, each of the wavelet coefficients decomposed into the bit planes through three separate coding paths. In the coefficient coding, a higher compression rate is achieved as the bit planes include more data values of “0.” Further, the coefficient coding is not performed on a zero bit plane or a bit plane whose data values are all “0s,” but is performed after the initial appearance of a bit plane including a significant data value of “1.” Therefore, in the state of FIG. 2, the bit planes of the high-order two bits are not subjected to coefficient coding, and only the bit planes of the low-order six bits are subjected to coefficient coding.
An MQ-coder part 5 performs binary arithmetic coding on the image data subjected to the coefficient coding in the coefficient modeling part 4, and outputs the resultant coded data to a code formation part 6.
In the image processing apparatus 50, the coefficient modeling part 4 and the MQ-coder part 5 form a coding part.
The code formation part 6 adds data such as information on the coding to a predetermined part of the coded data obtained in the MQ-coder part 5, thereby forming and outputting a series of coded data called a code stream.